home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Windows 3
/
dr win3.zip
/
dr win3
/
WINWORDS
/
SPELL10.ZIP
/
FRMCHK.FO_
/
FRMCHK.FO
Wrap
Text File
|
1993-12-04
|
5KB
|
176 lines
VERSION 2.00
Begin Form FrmChk
Caption = "TLC Spelling Checker"
ClientHeight = 2580
ClientLeft = 1380
ClientTop = 2436
ClientWidth = 6324
Height = 3000
Left = 1332
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2580
ScaleWidth = 6324
Top = 2064
Width = 6420
Begin Frame Frame1
Height = 2604
Left = 0
TabIndex = 0
Top = 0
Width = 6348
Begin Frame Frame2
Caption = "Command Buttons"
Height = 1992
Left = 3168
TabIndex = 4
Top = 360
Width = 2928
Begin CommandButton Cmd
Caption = "Delete"
Height = 336
Index = 4
Left = 2124
TabIndex = 11
Top = 1620
Width = 732
End
Begin CheckBox CkHilight
Caption = "Highlight"
Height = 192
Left = 1476
TabIndex = 10
Top = 684
Value = 1 'Checked
Width = 1092
End
Begin CommandButton Cmd
Caption = "&Quit"
Height = 336
Index = 3
Left = 1440
TabIndex = 9
Top = 1008
Width = 732
End
Begin CheckBox CkSuggest
Caption = "Suggest"
Height = 228
Left = 1440
TabIndex = 6
Top = 324
Value = 1 'Checked
Width = 1092
End
Begin CommandButton Cmd
Caption = "&Change"
Height = 336
Index = 2
Left = 252
TabIndex = 8
Top = 1332
Width = 840
End
Begin CommandButton Cmd
Caption = "&Next"
Height = 336
Index = 1
Left = 252
TabIndex = 7
Top = 792
Width = 840
End
Begin CommandButton Cmd
Caption = "&Add"
Height = 336
Index = 0
Left = 252
TabIndex = 5
Top = 324
Width = 840
End
End
Begin TextBox TxtNew
Height = 300
Left = 180
TabIndex = 3
Text = "TxtNex"
Top = 576
Width = 2424
End
Begin ListBox LstSuggest
Height = 1368
Left = 396
TabIndex = 1
Top = 972
Width = 1884
End
Begin Label LblHis
Caption = "LblHis"
Height = 264
Left = 216
TabIndex = 2
Top = 252
Width = 2280
End
End
End
Option Explicit
Sub CkSuggest_Click ()
If CkSuggest = 0 Then
LstSuggest.AddItem "(No Suggestions)"
Else
LstSuggest.Clear
End If
End Sub
Sub Cmd_Click (index As Integer)
Dim i As Integer
Select Case index
Case 0: i = WFind(LblHis, 1, LexPath + "English.Lex")
LstSuggest.Clear
While ChkWord()
Wend
Case 1: LstSuggest.Clear
While ChkWord()
Wend
Case 2: i = Len(TxtNew)
FrmDoc!Text1 = Left(FrmDoc!Text1, WordStart - 1) + TxtNew + Mid(FrmDoc!Text1, WordEnd)
LastCk = WordStart + i
LstSuggest.Clear
While ChkWord()
Wend
Case 3: Unload Me
Exit Sub
Case 4: i = DelWord(TxtNew, LexPath + "English.Lex")
While ChkWord()
Wend
End Select
End Sub
Sub Form_Load ()
' To use in a different program:
' before calling set LastCk=0 LexPath=path to english.lex+"\"
' Edit FrmDoc!Text1 to the name of the form and text box that you want to spell check
' Edit FrmAbout!CmnDialog in GetFileName to the name of your common dialog control
' Remove Sub Main from SpellM1.Bas
' enclude SpellM1.Bas and FrmChk.Frm in you program
While ChkWord()
Wend
End Sub
Sub Form_Unload (Cancel As Integer)
WordStart = 0
WordEnd = 0
LastCk = 0
End Sub
Sub LstSuggest_DblClick ()
TxtNew = LstSuggest.List(LstSuggest.ListIndex)
End Sub